/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.isn.atencionemergencia.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
/**
 *
 * @author pool
 */
@Embeddable
public class DetalleResultadooaeMedicamentoPK implements Serializable {
 
	private static final long serialVersionUID = 1L;
	@Basic(optional = false)
    @Column(name = "Num_roae", columnDefinition="CHAR(5) unsigned")
    private String numroae;
    @Basic(optional = false)
    @Column(name = "Cod_Medi", columnDefinition="CHAR(5) unsigned")
    private String codMedi;

    public DetalleResultadooaeMedicamentoPK() {
    }

    public DetalleResultadooaeMedicamentoPK(String numroae, String codMedi) {
        this.numroae = numroae;
        this.codMedi = codMedi;
    }

    public String getNumroae() {
        return numroae;
    }

    public void setNumroae(String numroae) {
        this.numroae = numroae;
    }

    public String getCodMedi() {
        return codMedi;
    }

    public void setCodMedi(String codMedi) {
        this.codMedi = codMedi;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (numroae != null ? numroae.hashCode() : 0);
        hash += (codMedi != null ? codMedi.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof DetalleResultadooaeMedicamentoPK)) {
            return false;
        }
        DetalleResultadooaeMedicamentoPK other = (DetalleResultadooaeMedicamentoPK) object;
        if ((this.numroae == null && other.numroae != null) || (this.numroae != null && !this.numroae.equals(other.numroae))) {
            return false;
        }
        if ((this.codMedi == null && other.codMedi != null) || (this.codMedi != null && !this.codMedi.equals(other.codMedi))) {
            return false;
        }
        return true;
    }
    
}
